<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>比较最大值</title>
    <script>
        function getMax(n1, n2) {
            console.log(n1 + '和' + n2 + '相比')
            return n1 > n2 ? n1 : n2
        }

        function getMax1(a, b, c) {
            console.log(a + '、' + b + '、' + c + '相比')
            return (a > b ? a : b) > c ? (a > b ? a : b) : c
        }


        console.log(getMax(6.98, 6.99) + '最大')
        console.log(getMax1(40, 70, 10) + '最大')
    </script>
</head>

<body>

</body>

</html>